<template>
    <section>
        <el-table :data="PropertyData">
            <el-table-column label="属性名" prop="PropertyName">
            </el-table-column>
            <el-table-column prop="otherText" label="属性值"></el-table-column>
            <el-table-column inline-template width="130px">
                <template>
                    <el-tooltip class="tip" placement="top" content="编辑商品属性">
                        <el-button type="primary" size="small" icon="edit" @click="propertyEdit"></el-button>
                    </el-tooltip>
                    <el-tooltip class="tip" placement="top" content="删除商品属性">
                        <el-button type="danger" size="small" icon="delete"></el-button>
                    </el-tooltip>
                </template>
            </el-table-column>
        </el-table>
        <el-col :span="24" class="lastCol">
            <el-button type="primary" @click="addProperty">添加商品属性</el-button>
        </el-col>
    </section>
</template>
<script>
    export default {
        data() {
            return {
                PropertyData: [{
                    PropertyName: 'color/色泽',
                    otherText: '苹果',
                },
                {
                    PropertyName: 'color/色泽',
                    otherText: '苹果',
                }],
            }
        },
        methods: {
            propertyEdit() {
                this.$router.push('/products/undefined/product_properties/:product_item_id/edit');
            },
            addProperty() {
                this.$router.push('/products/undefined/product_properties/new');
            }
        }
    }

</script>